Repository navigation
fix: BED-10664 recover GitHub team pagination after gateway failures - #111
Conversation
|
No actionable comments were generated in the recent review. WalkthroughOrganization team collection now retries gateway failures with smaller GraphQL page sizes while keeping the failed cursor. It retains teams already emitted, logs unrecovered page gaps, and continues collection with the next organization. ChangesOrganization Team Pagination Recovery
Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Bug fix Sequence Diagram(s)sequenceDiagram
participant OrganizationTeams
participant adaptive_graphql_paginate
participant GitHubGraphQL
participant Logger
OrganizationTeams->>adaptive_graphql_paginate: request organization team pages
adaptive_graphql_paginate->>GitHubGraphQL: request page at cursor
GitHubGraphQL-->>adaptive_graphql_paginate: gateway failure
adaptive_graphql_paginate->>GitHubGraphQL: retry same cursor with smaller page size
alt Page recovered
adaptive_graphql_paginate-->>OrganizationTeams: yield teams and continue pagination
else Retries exhausted
adaptive_graphql_paginate-->>OrganizationTeams: report failed cursor and page size
OrganizationTeams->>Logger: log collection gap and emitted team count
end
Possibly related PRs
Suggested reviewers: Merge Risk:
|
GitHub gateway failures previously stopped team pagination for the rest of an organization, leaving teams and dependent relationships uncollected. Reuse adaptive pagination to retry the failed cursor with smaller team pages while preserving emitted teams and independent member overflow pagination.
If recovery is exhausted, log the organization, cursor, final page size, and retained team count, then continue with the next organization. Document the recovery behavior in the README.
Validation: 658 tests passed; Ruff and git diff --check passed. Regression coverage includes first and later page HTTP 502/504 recovery, bounded exhaustion, continuation across organizations, non-gateway errors, and 101-member overflow after recovery.
Summary by CodeRabbit